package com.cn.transfer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cn.transfer.common.entity.General;
import com.cn.transfer.common.entity.PuPurchaseOrder;
import com.cn.transfer.common.vo.PurchaseOrder;
import com.cn.transfer.common.vo.PurchaseOrderList;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 向伟典
 * @date: 2023/9/1 14:37
 * @Description: ${description}
 */
public interface PuPurchaseOrderMapper extends BaseMapper<PuPurchaseOrder> {
    PurchaseOrder queryPurchaseOrders(@Param("voucherId") String voucherId);

    /**
     * 查询已审核的采购订单
     * @return
     */
    List<PurchaseOrder> purchaseOrderNotNullList();
    List<PurchaseOrder> purchaseOrderNotNullDayList();
    int inquireIsExist(@Param("code") String code);
    int insertVVPuechase(PurchaseOrder purchaseOrder);

    List<PurchaseOrder> vvPurchaseOrderList();
    PurchaseOrder byvvPurchaseOrderCode(@Param("id")String id);
    PurchaseOrder byPurchaseOrderCode(@Param("id") String id);

    List<PurchaseOrder> byChangedateList();

    void deletePurchaseOrderId(@Param("purchaseOrderId")String purchaseOrderId);

    /**
     * 查询采购订单为空的需求日期，把请购单需求日期更新到里面
     */
    List<General> getPurchaseOrderData();
    void updatePurchaseOrderData(@Param("PurchaseOrderCode") String purchaseOrderCode,@Param("MinRequireDate") String MinRequireDate);


}